package com.zheng.hr.rpc.service.impl;

import com.zheng.common.annotation.BaseService;

import com.zheng.hr.dao.mapper.HrMeetingMapper;
import com.zheng.hr.dao.model.HrMeetingUser;
import com.zheng.hr.dao.mapper.HrMeetingUserMapper;
import com.zheng.hr.rpc.api.HrMeetingUserService;
import com.zheng.common.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author likun
 * @since 2018-03-14
 */
@Service
@Transactional(rollbackFor = Exception.class)
@BaseService
public class HrMeetingUserServiceImpl extends BaseServiceImpl<HrMeetingUserMapper, HrMeetingUser> implements HrMeetingUserService {
    @Autowired
    private HrMeetingUserMapper meetingUserMapper;

    public List<Map<String, Object>> selectMeetingUsersById(Integer meetingId) {
        return meetingUserMapper.selectMeetingUsersById(meetingId);
    }

    public boolean updateMeetingUser(List<HrMeetingUser> meetingUsers) {
        for (HrMeetingUser user : meetingUsers) {
            updateById(user);
        }
        return true;
    }
}
